Update GetAssetsToGenerate to be always single asset#7576
Update GetAssetsToGenerate to be always single asset#7576Youssef1313 wants to merge 4 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the test-asset generation infrastructure so each TestAssetFixtureBase generates/builds a single asset instead of a collection, and adjusts many integration-test fixtures accordingly.
Changes:
- Changed
TestAssetFixtureBase.InitializeAsyncto generate/build exactly one asset. - Changed
GetAssetsToGeneratefromIEnumerable<(string ID, string Name, string Code)>to a single(string ID, string Name, string Code)tuple. - Updated many acceptance/integration test fixtures to match the new
GetAssetsToGeneratesignature.
Reviewed changes
Copilot reviewed 89 out of 89 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/Utilities/Microsoft.Testing.TestInfrastructure/TestAssetFixtureBase.cs | Switches asset generation from “many” to a single asset and updates the abstract contract. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/AbortionTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ConsoleTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/CrashDumpTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/CrashPlusHangDumpTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/CustomBannerTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/DataConsumerThroughputTests.cs | Updates fixture override; file header now includes UTF-8 BOM. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/DiagnosticTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/EnvironmentVariablesConfigurationProviderTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ExecutionRequestCompleteTests.cs | Updates fixture override; file header now includes UTF-8 BOM. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ExecutionTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ExitOnProcessExitTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ForwardCompatibilityTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HangDumpOutputTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HangDumpProcessTreeTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HangDumpTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpInfoAllExtensionsTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpInfoTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/LocalizationFailingTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/LocalizationTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/MaxFailedTestsExtensionTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/NoBannerTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/RetryFailedTestsTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ServerLoggingTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TelemetryDisabledTests.cs | Updates fixture override; file header now includes UTF-8 BOM. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TelemetryTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TestHostProcessLifetimeHandlerTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TimeoutTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TrxDataRowTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TrxFailingTestTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TrxSkippedTestTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TrxTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/UnhandledExceptionPolicyTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AbortionTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AppDomainTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AspireSdkTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AssemblyCleanupTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AssemblyResolverTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/CancellationTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ConfigurationMSTestSettingsTests.cs | Updates fixture override; file header now includes UTF-8 BOM. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ConfigurationMSTestV2SettingsTests.cs | Updates fixture override; file header now includes UTF-8 BOM. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ConfigurationSettingsTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/CustomAttributesTests.cs | Updates fixture override; file header now includes UTF-8 BOM. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DeadlockTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DeploymentItemTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DuplicateTestClassAttributeTests.cs | Updates fixture override; file header now includes UTF-8 BOM. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DynamicDataMethodTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/FrameworkOnlyTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/GenericTestMethodTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/HelpInfoTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/IgnoreTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/InconclusiveTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LeakTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleAttributesTaskThreadingTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleAttributesValueTaskThreadingTests.cs | Updates fixture override; file header now includes UTF-8 BOM. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleAttributesVoidThreadingTests.cs | Updates fixture override; file header now includes UTF-8 BOM. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleWithParallelAttributesTaskThreadingTests.cs | Updates fixture override; file header now includes UTF-8 BOM. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/MaxFailedTestsExtensionTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/OutputTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ParameterizedDataSourceTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ParameterizedDataRowTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ParameterizedTestTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/PlaywrightSdkTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/RetryTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/RunsettingsTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STAThreadingTests.cs | Updates fixture override; file header now includes UTF-8 BOM. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestClassCooperativeTimeoutTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestClassTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestClassTimeoutTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestMethodCooperativeTimeoutTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestMethodTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestMethodTimeoutTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ServerModeTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/SynchronizationContextTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestContextTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestDiscoveryTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestDiscoveryWarningsTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestFilterTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestRunParametersTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadContextCultureFlowsInheritanceTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadContextCultureFlowsTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadContextTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadingTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TimeoutTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TrxReportTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TupleDynamicDataTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ValueTaskTests.cs | Updates fixture override to the new single-asset signature. |
| test/IntegrationTests/MSTest.Acceptance.IntegrationTests/WinUITests.cs | Updates fixture override to the new single-asset signature. |
Comments suppressed due to low confidence (17)
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/RunsettingsTests.cs:105
GetAssetsToGeneratehas a tuple return type but still usesyield return, which requires an iterator return type and will not compile. Replace with a directreturn ( ... )and removeyield.
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestClassCooperativeTimeoutTests.cs:70GetAssetsToGeneratereturns a tuple but still usesyield return, which will not compile. Replace the iterator body with a directreturn ( ... )and removeyield.
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestClassTests.cs:70GetAssetsToGeneratehas a tuple return type but still usesyield return, which will not compile. Replace with a directreturn ( ... )and removeyield.
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TrxReportTests.cs:56GetAssetsToGeneratereturns a tuple but still usesyield return, which will not compile. Replace the iterator body with a directreturn ( ... )and removeyield.
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HangDumpProcessTreeTests.cs:40GetAssetsToGeneratenow returns a single tuple, but the implementation still usesyield return, which requires an iterator return type and will not compile. Replace the iterator block with a directreturn ( ... )(or expression-bodied member) and removeyieldusage.
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpInfoAllExtensionsTests.cs:469GetAssetsToGeneratehas a tuple return type but still usesyield return, which won't compile. Replace the iterator body with a directreturn ( ... )and removeyield.
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AssemblyCleanupTests.cs:41GetAssetsToGeneratehas been changed to return a single tuple, but this override still usesyield returnand will not compile. Replace with a directreturn ( ... )and removeyield.
public override (string ID, string Name, string Code) GetAssetsToGenerate()
{
yield return (ProjectName, ProjectName,
SourceCode
.PatchTargetFrameworks(TargetFrameworks.All)
.PatchCodeWithReplace("$MSTestVersion$", MSTestVersion));
}
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DynamicDataMethodTests.cs:66
GetAssetsToGeneratereturns a tuple but the implementation still usesyield return, which will not compile. Replace with a directreturn ( ... )and removeyield.
public override (string ID, string Name, string Code) GetAssetsToGenerate()
{
yield return (ProjectName, ProjectName,
SourceCode
.PatchTargetFrameworks(TargetFrameworks.All)
.PatchCodeWithReplace("$MSTestVersion$", MSTestVersion));
}
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleAttributesValueTaskThreadingTests.cs:41
GetAssetsToGeneratereturns a tuple but this override still usesyield return, which will not compile. Replace the iterator body with a directreturn ( ... )and removeyield.
public override (string ID, string Name, string Code) GetAssetsToGenerate()
{
yield return (ProjectName, ProjectName,
SourceCode
.PatchTargetFrameworks(TargetFrameworks.Net)
.PatchCodeWithReplace("$MSTestVersion$", MSTestVersion));
}
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ParameterizedDataRowTests.cs:43
GetAssetsToGeneratenow returns a tuple, but this override still usesyield return, which will not compile. Replace with a directreturn ( ... )and removeyield.
public override (string ID, string Name, string Code) GetAssetsToGenerate()
{
yield return (DataRowAssetName, DataRowAssetName,
SourceCodeDataRow
.PatchTargetFrameworks(TargetFrameworks.All)
.PatchCodeWithReplace("$MSTestVersion$", MSTestVersion));
}
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TimeoutTests.cs:1066
GetAssetsToGeneratemixes a directreturnwith subsequentyield returnstatements. This won’t compile, and it also indicates this fixture still needs multiple assets (severalGetAssetPath(...)properties above). Either refactor this test to package everything into a single generated asset/project, or revert the fixture API to support multiple assets.
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/LocalizationFailingTests.cs:126GetAssetsToGeneratenow returns a single tuple, but this implementation still usesyield return, which will not compile. Replace with a directreturn ( ... )and removeyield.
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TestHostProcessLifetimeHandlerTests.cs:142GetAssetsToGeneratereturns a tuple but still usesyield return, which requires an iterator return type and will not compile. Replace the iterator block with a directreturn ( ... )and removeyield.
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/InconclusiveTests.cs:127GetAssetsToGeneratenow returns a single tuple, but this override still usesyield return, which will not compile. Replace with a directreturn ( ... )and removeyield.
public override (string ID, string Name, string Code) GetAssetsToGenerate()
{
yield return (ProjectName, ProjectName,
SourceCode
.PatchTargetFrameworks(TargetFrameworks.NetCurrent)
.PatchCodeWithReplace("$MSTestVersion$", MSTestVersion));
}
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/WinUITests.cs:45
- This override still uses
yield break/yield return, butGetAssetsToGeneratenow returns a tuple, so the method cannot be an iterator and will not compile. If the intent is to skip asset generation on non-Windows, the base/fixture API needs to represent “no asset” (e.g., nullable/optional asset), or the OS gating needs to move to a place that preventsInitializeAsyncfrom running (instead ofyield break).
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ConfigurationSettingsTests.cs:97 GetAssetsToGeneratenow returns a tuple, but this override still usesyield return, which will not compile. Replace the iterator body with a directreturn ( ... )and removeyield.
public override (string ID, string Name, string Code) GetAssetsToGenerate()
{
yield return (ProjectName, ProjectName,
SourceCode
.PatchTargetFrameworks(TargetFrameworks.All)
.PatchCodeWithReplace("$ProjectName$", ProjectName)
.PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)
.PatchCodeWithReplace("$AppendSettings$", string.Empty));
}
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/IgnoreTests.cs:121
GetAssetsToGeneratehas a tuple return type but still usesyield return, which requires an iterator return type and will not compile. Replace with a directreturn ( ... )and removeyield.
public override (string ID, string Name, string Code) GetAssetsToGenerate()
{
yield return (ProjectName, ProjectName,
SourceCode
.PatchTargetFrameworks(TargetFrameworks.NetCurrent)
.PatchCodeWithReplace("$MSTestVersion$", MSTestVersion));
}
test/Utilities/Microsoft.Testing.TestInfrastructure/TestAssetFixtureBase.cs
Show resolved
Hide resolved
ec3f58b to
ddd4210
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 89 out of 89 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (16)
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/IgnoreTests.cs:120
- GetAssetsToGenerate now returns a single tuple (not an iterator), but this method still uses
yield return, which will not compile. Convert to a direct tuple return.
public override (string ID, string Name, string Code) GetAssetsToGenerate()
{
yield return (ProjectName, ProjectName,
SourceCode
.PatchTargetFrameworks(TargetFrameworks.NetCurrent)
.PatchCodeWithReplace("$MSTestVersion$", MSTestVersion));
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleAttributesValueTaskThreadingTests.cs:40
- GetAssetsToGenerate now returns a single tuple, but the method body still uses
yield return, which will not compile. Update to return the tuple directly.
public override (string ID, string Name, string Code) GetAssetsToGenerate()
{
yield return (ProjectName, ProjectName,
SourceCode
.PatchTargetFrameworks(TargetFrameworks.Net)
.PatchCodeWithReplace("$MSTestVersion$", MSTestVersion));
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ParameterizedDataRowTests.cs:42
- GetAssetsToGenerate now returns a single tuple, but the implementation still uses
yield return(iterator syntax), which will not compile. Convert this to a direct tuple return.
public override (string ID, string Name, string Code) GetAssetsToGenerate()
{
yield return (DataRowAssetName, DataRowAssetName,
SourceCodeDataRow
.PatchTargetFrameworks(TargetFrameworks.All)
.PatchCodeWithReplace("$MSTestVersion$", MSTestVersion));
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/WinUITests.cs:39
- GetAssetsToGenerate now returns a single tuple (not an iterator), but this method still uses iterator statements (
yield break/yield return), which will not compile. Additionally, this fixture needs a way to skip asset generation on non-Windows without failing during InitializeAsync (e.g., allow 0 assets, or make the asset return optional).
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TestHostProcessLifetimeHandlerTests.cs:141 - GetAssetsToGenerate now returns a single tuple (not an iterator), but the method body still uses
yield return, which will not compile. Replace the iterator implementation with a direct tuple return (or adjust the base contract back to an IEnumerable if multiple/conditional assets are required).
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpInfoAllExtensionsTests.cs:468 - GetAssetsToGenerate now returns a single tuple (not an iterator), but this method still uses
yield return, which will not compile. Update to return the tuple directly (or keep the previous IEnumerable contract).
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/LocalizationFailingTests.cs:125 - GetAssetsToGenerate now returns a single tuple (not an iterator), but the implementation still uses
yield return, which will not compile. Convert to a direct tuple return (or revert the base method back to IEnumerable if you still need iterator semantics).
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ConfigurationSettingsTests.cs:93 - GetAssetsToGenerate now returns a single tuple, but this method still uses
yield return(iterator syntax), which will not compile. Update this to return the tuple directly.
public override (string ID, string Name, string Code) GetAssetsToGenerate()
{
yield return (ProjectName, ProjectName,
SourceCode
.PatchTargetFrameworks(TargetFrameworks.All)
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestClassTests.cs:69
- GetAssetsToGenerate now returns a single tuple, but the implementation still uses
yield return(iterator syntax), which will not compile. Convert this to a direct tuple return.
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AssemblyCleanupTests.cs:40 - GetAssetsToGenerate now returns a single tuple (not an iterator), but the implementation still uses
yield return, which will not compile. Replace with a direct tuple return (or revert the base method signature back to IEnumerable if iterator semantics are needed).
public override (string ID, string Name, string Code) GetAssetsToGenerate()
{
yield return (ProjectName, ProjectName,
SourceCode
.PatchTargetFrameworks(TargetFrameworks.All)
.PatchCodeWithReplace("$MSTestVersion$", MSTestVersion));
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/RunsettingsTests.cs:104
- GetAssetsToGenerate now returns a single tuple, but the implementation still uses
yield return, which will not compile. Update this method to return the tuple directly.
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestClassCooperativeTimeoutTests.cs:69 - GetAssetsToGenerate now returns a single tuple, but this method still uses
yield return, which will not compile. Replace with a direct tuple return.
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TrxReportTests.cs:55 - GetAssetsToGenerate now returns a single tuple, but the method body still uses
yield return, which will not compile. Update to return the tuple directly.
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/InconclusiveTests.cs:126 - GetAssetsToGenerate now returns a single tuple, but the implementation still uses
yield return(iterator syntax), which will not compile. Replace with a direct tuple return.
public override (string ID, string Name, string Code) GetAssetsToGenerate()
{
yield return (ProjectName, ProjectName,
SourceCode
.PatchTargetFrameworks(TargetFrameworks.NetCurrent)
.PatchCodeWithReplace("$MSTestVersion$", MSTestVersion));
test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HangDumpProcessTreeTests.cs:39
- GetAssetsToGenerate now returns a single tuple (not an iterator), but the implementation still uses
yield return, which will not compile. Convert this to a direct tuple return (or restore an IEnumerable-based contract).
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DynamicDataMethodTests.cs:65 - GetAssetsToGenerate now returns a single tuple, but the implementation still uses
yield return, which will not compile. Replace this iterator block with a direct tuple return.
public override (string ID, string Name, string Code) GetAssetsToGenerate()
{
yield return (ProjectName, ProjectName,
SourceCode
.PatchTargetFrameworks(TargetFrameworks.All)
.PatchCodeWithReplace("$MSTestVersion$", MSTestVersion));
test/Utilities/Microsoft.Testing.TestInfrastructure/TestAssetFixtureBase.cs
Show resolved
Hide resolved
test/Utilities/Microsoft.Testing.TestInfrastructure/TestAssetFixtureBase.cs
Show resolved
Hide resolved
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TimeoutTests.cs
Outdated
Show resolved
Hide resolved
86357da to
5a38eae
Compare
| public override (string ID, string Name, string Code) GetAssetsToGenerate() => (ProjectName, ProjectName, | ||
| SourceCode | ||
| .PatchCodeWithReplace("$TargetFramework$", WinUITargetFramework) | ||
| .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); |
There was a problem hiding this comment.
This fixture no longer short-circuits on non-Windows. Because AcceptanceTestBase<TFixture>.ClassInitialize unconditionally calls InitializeAsync, the WinUI asset may still be generated/built on non-Windows even though the test method is marked with [OSCondition(Windows)]. That can break CI/dev runs on other OSes (WinUI builds are typically Windows-only). Consider putting [OSCondition(OperatingSystems.Windows)] on the test class (or otherwise making the fixture InitializeAsync a no-op on non-Windows) so class initialization doesn’t try to build the WinUI asset.
| public override (string ID, string Name, string Code) GetAssetsToGenerate() => (AssetName, AssetName, | ||
| Sources | ||
| .PatchTargetFrameworks(TargetFrameworks.All) | ||
| .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion) | ||
| .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); |
There was a problem hiding this comment.
This fixture used to be able to return no assets on unsupported OSes; it now always generates/builds the asset. Since AcceptanceTestBase<TFixture>.ClassInitialize always runs InitializeAsync, this means the Windows-specific abort harness project will be built even when the test is skipped by [OSCondition(Windows)]. If building this asset is not guaranteed to be safe on non-Windows, consider moving [OSCondition(OperatingSystems.Windows)] to the class level or making the fixture initialization a no-op on non-Windows.
| public override (string ID, string Name, string Code) GetAssetsToGenerate() | ||
| => (AssetName, AssetName, | ||
| Sources | ||
| .PatchTargetFrameworks(TargetFrameworks.All) | ||
| .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion)); |
There was a problem hiding this comment.
This fixture now always generates/builds the abort asset. Because AcceptanceTestBase<TFixture>.ClassInitialize unconditionally calls InitializeAsync, this can cause the Windows-specific abort harness to be built even when the test is skipped via [OSCondition(Windows)]. If this asset isn’t safe to build on non-Windows, consider adding [OSCondition(OperatingSystems.Windows)] at the class level or making the fixture initialization a no-op on non-Windows.
No description provided.